package cn.com.yusys.yusp.mobile.web.rest;

import cn.com.yusys.yusp.commons.mapper.QueryModel;
import cn.com.yusys.yusp.commons.web.rest.dto.ResultDto;
import cn.com.yusys.yusp.mobile.service.WcrmDocuCustSumZhService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * 领导驾驶舱
 * @author zoie
 */
@RestController
@RequestMapping("/mobile/wcrmDocuCustSumZh")
public class WcrmDocuCustSumZhResource {

    @Resource
    private WcrmDocuCustSumZhService wcrmDocuCustSumZhService;

    /**
     * 建档客户数看板
     * @return
     */
    @GetMapping("/queryDocumentCusNum")
    @ApiOperation(value = "建档客户数看板", notes = "建档客户数看板")
    public ResultDto<Object> queryDocumentCusNum() {
        return new ResultDto<>(wcrmDocuCustSumZhService.queryDocumentCusNum());
    }

    /**
     * 客户贡献分级
     * @return
     */
    @GetMapping("/queryCusContributeLevel")
    @ApiOperation(value = "客户贡献分级", notes = "客户贡献分级")
    public ResultDto<List<Map<String,Object>>> queryCusContributeLevel() {
        List<Map<String,Object>> list= wcrmDocuCustSumZhService.queryCusContributeLevel();
        return new ResultDto<>(list);
    }

    /**
     * 客户趋势
     * @return
     */
    @GetMapping("/queryCusTrend")
    @ApiOperation(value = "客户趋势", notes = "客户趋势")
    public ResultDto<Map<String,Object>> queryCusTrend() {
        Map<String,Object> map= wcrmDocuCustSumZhService.queryCusTrend();
        return new ResultDto<>(map);
    }

    /**
     * 存款趋势
     * @return
     */
    @GetMapping("/queryDepBalList")
    @ApiOperation(value = "存款趋势", notes = "存款趋势")
    public ResultDto<List<Map<String,Object>>> queryDepBalList() {
        List<Map<String,Object>> list= wcrmDocuCustSumZhService.queryDepBalList();
        return new ResultDto<>(list);
    }

    /**
     * 贷款趋势
     * @return
     */
    @GetMapping("/queryLoanBalList")
    @ApiOperation(value = "贷款趋势", notes = "贷款趋势")
    public ResultDto<List<Map<String,Object>>> queryLoanBalList() {
        List<Map<String,Object>> list= wcrmDocuCustSumZhService.queryLoanBalList();
        return new ResultDto<>(list);
    }

    /**
     * 支行建档数排名
     * @param queryModel
     * @return
     */
    @GetMapping("/queryDocumentRank")
    @ApiOperation(value = "支行建档数排名", notes = "支行建档数排名")
    public ResultDto<List<Map<String,Object>>> queryDocumentRank(QueryModel queryModel) {
        List<Map<String,Object>> list= wcrmDocuCustSumZhService.queryDocumentRank(queryModel);
        return new ResultDto<>(list);
    }

    /**
     * queryConverRank
     * @param queryModel
     * @return
     */
    @GetMapping("/queryConverRank")
    @ApiOperation(value = "支行转换量排名", notes = "支行转换量排名")
    public ResultDto<List<Map<String,Object>>> queryConverRank(QueryModel queryModel) {
        List<Map<String,Object>> list= wcrmDocuCustSumZhService.queryConverRank(queryModel);
        return new ResultDto<>(list);
    }

}